package com.atzzy.ysmall.ysmall_beans;
/**
 * @Author JAVAZeng
 * @Date 2022/2/21 23:59
 * @Version 1.0
 */
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;


@Data
@AllArgsConstructor
@NoArgsConstructor
public class Users implements Serializable {

  private Integer userId;
  private String username;
  private String password;
  private String nickname;
  private String realname;
  private String userImg;
  private String userMobile;
  private String userEmail;
  private String userSex;
  private Date userBirth;
  private Date  userRegtime;
  private Date  userModtime;
  private String userAccount;

  @Override
  public boolean equals(Object o) {
    if (this == o) return true;
    if (o == null || getClass() != o.getClass()) return false;

    Users users = (Users) o;

    if (!userId.equals(users.userId)) return false;
    if (!username.equals(users.username)) return false;
    if (!password.equals(users.password)) return false;
    if (!nickname.equals(users.nickname)) return false;
    if (!realname.equals(users.realname)) return false;
    if (!userImg.equals(users.userImg)) return false;
    if (!userMobile.equals(users.userMobile)) return false;
    if (!userEmail.equals(users.userEmail)) return false;
    if (!userSex.equals(users.userSex)) return false;
    if (!userBirth.equals(users.userBirth)) return false;
    if (!userRegtime.equals(users.userRegtime)) return false;
    if (!userModtime.equals(users.userModtime)) return false;
    return userAccount.equals(users.userAccount);
  }

  @Override
  public int hashCode() {
    int result = userId.hashCode();
    result = 31 * result + username.hashCode();
    result = 31 * result + password.hashCode();
    result = 31 * result + nickname.hashCode();
    result = 31 * result + realname.hashCode();
    result = 31 * result + userImg.hashCode();
    result = 31 * result + userMobile.hashCode();
    result = 31 * result + userEmail.hashCode();
    result = 31 * result + userSex.hashCode();
    result = 31 * result + userBirth.hashCode();
    result = 31 * result + userRegtime.hashCode();
    result = 31 * result + userModtime.hashCode();
    result = 31 * result + userAccount.hashCode();
    return result;
  }
}
